package com.hqyj.springbootdemo01.common.result;

import lombok.Data;

import java.util.List;

/**
 * @author sdx2009
 * @package com.hqyj.springbootdemo01.common.result
 * @date 2022/8/27 15:32
 */
@Data
public class PageResult<T> {

    private Integer code;

    private String msg;

    //    总记录条数
    private Long total;

    //    记录列表
    private List<T> rows;

    //    总页数
    private Long totalPage;

    //    第几页
    private Long pageNumber;

    public PageResult() {

    }

    public PageResult(Integer code, String msg, Long total, List<T> rows, Long totalPage,
                      Long pageNumber) {

        this.code = code;
        this.msg = msg;
        this.total = total;
        this.rows = rows;
        this.totalPage = totalPage;
        this.pageNumber = pageNumber;
    }
}
